<%@page import="com.spartancoder.accommodation.models.College" %>
<%@page import="com.spartancoder.accommodation.beans.CollegeBean" %>
<%
CollegeBean cb = College.fetch(Integer.parseInt(request.getParameter("cid")));
cb.setAvailable(!cb.isAvailable());
College.update(cb);

session.setAttribute("flash", "Starea a fost schimbata");
response.sendRedirect("list-college.jsp?id=" + request.getParameter("uid"));
%>